package com.haoxin.ai_course.modules.sys.entity;


import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用户与角色对应关系
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class SysUserRole extends Model<SysUserRole> implements Serializable {
	private static final long serialVersionUID = 1L;

	@TableId
	private Long id;

	/**
	 * 用户ID
	 */
	private Long userId;

	/**
	 * 角色ID
	 */
	private Long roleId;
	
	public boolean equals(Object o) {
		if(o == null) {
			return true;
		}
		SysUserRole obj = (SysUserRole)o;
		if(id.longValue() == obj.id.longValue()) {
			return true;
		}
		return false;
	}
	
}
